import java.util.Random;
import java.util.Scanner;

public class Test6 {
    //此案例用于实现抽红包
    public static void main(String[] args) {
        int [] money = {9,666,188,520,99999};
        Scanner sc = new Scanner(System.in);
        Random  r = new Random();
        for (int i = 0; i < money.length; i++) {
            System.out.println("请输入任意字符以进行抽奖");
            sc.nextInt();
            while(true){
                int index = r.nextInt(5);
                if(money[index] != 0){
                    System.out.println("恭喜你抽中" + money[index] + "红包");
                    money[index] = 0;
                    break;
                }

            }
        }
    }

}
